package com.sentinel.demo03.handler;

import com.alibaba.csp.sentinel.slots.block.BlockException;

public class MyBlockHandler {

    public static String sayHiBlockHandler(String name, BlockException e) {
        return "sorry ["+name+"], hello功能被sentinel限流了";
    }

    public static String sayHiFallback(String name, Throwable e) {
        return "sorry ["+name+"], hello功能出现了业务异常";
    }

    public static String sayHiDegrade(String name, Throwable e) {
        return "sorry ["+name+"], hello功能被sentinel熔断了";
    }
}
